import request from '@/utils/request'
// 获取角色目录
export function getRoleListAPI(params) {
  return request({
    url: '/auth/role',
    method: 'get',
    params
  })
}
// 新增请求
export function addRoleAPI(data) {
  return request({
    url: '/auth/role',
    method: 'post',
    data
  })
}
// 删除请求
export function delRoleAPI(id) {
  return request({
    url: '/auth/role/' + id,
    method: 'delete'
  })
}
// 表单回显
export function getRoleInfoAPI(id) {
  return request({
    url: '/auth/role/' + id,
    method: 'get'
  })
}
// 编辑请求
export function editRoleInfoAPI(data) {
  return request({
    url: '/auth/role/' + data.id,
    method: 'put',
    data
  })
}
